import Data.Ratio

listOfPotentials = [ (a,b) | a<-[10..99], b<-[(a+1)..99], check a b ]
	where
	check a b
		| a2 == 0 = False
		| b2 == 0 = False
		| a2 == b2 = (a % b) == ( a1 % b1 )
		| a1 == b2 = (a % b) == ( a2 % b1 )
		| a2 == b1 = (a % b) == ( a1 % b2 )
		| a1 == b1 = (a % b) == ( a2 % b2 )
		| otherwise = False
		where
		a1 = a `div` 10
		a2 = a `rem` 10
		b1 = b `div` 10
		b2 = b `rem` 10

euler_033 = denominator $ product $ map (\(a,b) -> (a % b)) listOfPotentials